import fetch from '@/utils/fetch'

export default {
  async page(query) {
    return await fetch({
      url: '/table/role/page',
      method: 'post',
      data: query
    })
  },

  async save(data) {
    return await fetch({
      url: '/table/role/save',
      method: 'post',
      data
    })
  },

  async remove(data) {
    return await fetch({
      url: '/table/role/remove',
      method: 'post',
      data
    })
  },

  async powerList(data) {
    return await fetch({
      url: '/role/powerList',
      method: 'post',
      data
    })
  },

  async getRolePower(data) {
    return await fetch({
      url: '/role/getPower',
      method: 'post',
      data
    })
  },

  async savePower(data){
    return await fetch({
      url: '/role/savePower',
      method: 'post',
      data
    })
  }
}

